import http from '../utils/http'

/**
 * 修改订单地址
 * @param {*} param 
 */
export const reqOrderAddressEdit = (param) =>{
  return http.get('/order/address',param,{
    'content-type': 'application/x-www-form-urlencoded'
  })
}

/**
 * 取消订单
 * @param {*} orderId 
 */
export const reqOrderCancel = (orderId) =>{
  return http.get(`/order/cancel/${orderId}`)
}

/**
 * 获取订单详细信息
 * @param {}} orderId 
 */
export const reqOrderDetail = (orderId) =>{
  return http.get(`/order/${orderId}`)
}

/**
 * 确认收货
 */
export const reqConsign = (orderId) =>{
  return http.put(`/order/confirm/${orderId}`)
}

/**
 * 获取订单物流信息
 */
export const reqDeliveryDetail = (orderId) =>{
  return http.get(`/delivery/${orderId}`)
}

/**
 * 支付订单
 * @param {} orderId 
 */
export const reqPayOrder = (orderId) => {
  return http.get(`/order/pay/${orderId}`)
}